1. Field
This disclosure relates generally to a portable device and, more specifically, to techniques for preventing damage to a portable device.
2. Related Art
Today, the use of portable devices (such as notebook computer systems, laptop computer systems, personal digital assistants (PDAs), and mobile telephones) is ubiquitous in both homes and businesses. Typically, a portable device includes a power adapter port for connecting the device to an AC power source (via an AC/DC converter) and a number of device ports that allow the portable device to be attached to a number of peripheral devices. Today, many portable devices incorporate plug and play functionality, which allows connection of a new device to a computer system without requiring reconfiguration (or manual installation of device drivers). Plug-and-play functionality includes hot plugging which is applicable to devices that implement universal serial bus (USB) and IEEE 1494 technologies. In general, hot plugging refers to the ability to remove and replace components of a machine, such as a computer system, while the machine is operating. When appropriate software is installed on a hot plug enabled computer system, a user can plug and unplug components without rebooting the computer system.
Hot plug technology has become commonplace in recent years and, today, even low-end computer systems usually support hot plugging (or hot swapping). Hot swap devices include USB memory keys (flash drives), hard drives, peripheral component interface extended (PCI-X) expansion cards, personal computer memory card international association (PCMCIA) cards (or PC-cards), some power supplies, and certain processors. In general, a machine that supports hot swapping is capable of detecting that a device has been attached/detached to/from the machine. Electrical and mechanical connectors of a hot swap capable machine are usually designed such that a device and a user are not harmed by connecting/disconnecting the device to/from the machine. In some contexts, the term ‘hot swapping’ refers only to the ability to add or remove hardware without powering down the system, while in other contexts the term ‘hot swapping’ refers to an ability of a machine to autonomously detect when hardware is added or removed. In the former case, one can add or remove hardware without powering down, but system software may have to be notified when new hardware is added to a system in order for the system to use the new hardware (frequently referred to as ‘cold plugging’). Examples of the cold plugging technologies include RS-232 and lower-end small computer system interface (SCSI) devices, while examples of hot plugging technologies include USB, IEEE 1394, and higher-end SCSI devices.
In computer hardware, a ‘port’ serves as a connection point between the computer and other devices. Physically, a hardware port is a specialized outlet to which a plug or cable connects. Hardware ports may be male (unusual, as protruding pins easily break) or female (typical). Hot-pluggable ports can be connected while equipment is powered and running. About the only port on a typical conventional personal computer (PC) that is not hot-pluggable is a legacy personal system/2 (PS/2) connector. Hot-plugging a PS/2 keyboard into a PS/2 port of a computer can cause permanent damage to a motherboard of the computer. Plug-and-play ports are generally designed so that connected devices automatically begin handshaking upon connection completion. Auto-detect ports, such as plug-and-play ports, may automatically determine what kind of device has been attached and a purpose of the port. Some auto-detect ports can even switch between input and output based on context.
A port may be coupled to a device through a number of different technologies (such as metal conductors, optical fiber, microwave, etc.). Devices that attach to a USB port can be custom devices (which require a custom device driver), or may belong to a device class, which defines an expected behavior in terms of device and interface descriptors, such that the same device driver may be used for any device that is a member of the device class. In general, an operating system (OS) should implement all USB device classes so as to provide generic drivers for any USB device.